package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 游记评论类
 */
@Getter
@Setter
@JsonIgnoreProperties("handler")
public class TravelComment extends BaseDomain {

    private User user;//评论用户

    @JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8" )
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;//创建时间

    private String content;//评论内容

    private Travel travel;//评论游记

    private Integer state = 1;//状态

    private int likeNum;//点赞数

    //关联回复类属性,查询评论的时候将回复的评论查询出来
    private List<TravelReplyComment> replyComments = new ArrayList<>();

}